package cn.fastoo.common.entity.product;

import cn.fastoo.common.sampleframe.entity.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import org.apache.commons.lang3.StringUtils;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by lowkey on 17/7/24.
 */
@Table(name = "product_category")
public class ProductCategory {

    private static final long serialVersionUID = 1L;
    /** 主键ID **/
    @Id
    @Column(name = "id")
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Long id;

    @Id
    @Column(name = "version")
    private Integer version;

    public Integer getVersion() {
        if(version==null){
            return 0;
        }
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }


    /** 主键ID **/
    public Long getId() {
        return id;
    }

    /** 主键ID **/
    public void setId(Long id) {
        this.id = id;
    }


    @Column(name = "name")
    private String name;

    @Column(name = "pid")
    private Long pid;

    @Column(name = "en_name")
    private String enName;
    @Column(name = "code")
    private String code;
    @Column(name = "pic_url")
    private String picUrl;
    @Column(name = "icon")
    private String icon;
    @Column(name = "enable")
    private Integer enable;

    @Column(name = "remark")
    private String remark;
    @Column(name = "order_by")
    private Integer orderBy;


    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getPid() {
        return pid;
    }

    public void setPid(Long pid) {
        this.pid = pid;
    }

    public String getEnName() {
        return enName;
    }

    public void setEnName(String enName) {
        this.enName = enName;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public Integer getEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }


    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Integer getOrderBy() {
        return orderBy;
    }

    public void setOrderBy(Integer orderBy) {
        this.orderBy = orderBy;
    }
}
